import requests
from loguru import logger

from api.base import Login


class Order(Login):

    def api_front_oder(self):
        data = {
            "url": "https://api.admin.merchant.java.crmeb.net/api/admin/merchant/login",
            "method": "post",
            "headers": {'content-type': 'application/json', },
            "json": {
                'account': "17300000000",
                'pwd': '000000',
                'captchaVO': {},
                'captcha': {
                    'captchaVerification': '',
                    'secretKey': '',
                    'token': '',
                },
            }
        }
        logger.info(f"请求参数：{data}")
        r = requests.request(**data)
        logger.info(f"响应：{r.json()}")
        return r.json()
